import React from 'react';
import {Card} from 'antd';
import styles from './index.less';

export default ({title, children}) => {
    return (
        <div className={styles.component}>
            <Card bordered={false}
                bodyStyle={{ padding: '0px 10px' }}>
                    <div><span className={styles.title}>{title}</span></div>
                    {children && (
                        <div className={styles.content}>{children}</div>
                    )}
            </Card>
        </div>
    );

};
